//---------------------------------------------------------------------------

#ifndef TBookMarksH
#define TBookMarksH
//---------------------------------------------------------------------------
#include "common.h"
namespace WYHGloox{
	class TBookMarks : public BookmarkHandler
	{
		private:
			Client *_client;
			BookmarkStorage *bookmarks;
			BookmarkList BookList;
			ConferenceList ConfList;
		public:
			TBookMarks(Client *client);
			virtual ~TBookMarks();
			virtual void handleBookmarks( const BookmarkList &bList, const ConferenceList &cList );
			TOnBookMarkItem FOnBookMarkItem;
			TOnConfrenceItem FOnConfrenceItem;
			void __fastcall GetBookMarksAndConferences();
		BookmarkList::iterator __fastcall DeleteBookMark(int index); //-1 all
		void __fastcall SaveBookMark();
		BookmarkList::iterator __fastcall EditBookMark(unsigned int index,std::string url,std::string name);
		BookmarkList::iterator __fastcall AddBookMark(std::string url,std::string name);

		ConferenceList::iterator __fastcall DeleteConference(int index); //-1 all
		void __fastcall SaveConference();
		ConferenceList::iterator __fastcall EditConference(unsigned int index,std::string jid,std::string name,std::string nick,std::string password,bool autojoin);
		ConferenceList::iterator __fastcall AddConference(std::string jid,std::string name,std::string nick,std::string password,bool autojoin);
	};
};
using namespace WYHGloox;
#endif
